import React, {FC, useState} from "react";

const StateDemo : FC = ()=>{


    const [count,setCount] = useState(0);
    const [num,setNum] = useState(10);
    function add() {
        setCount( count + 1);
    }
    function reduce() {
        setNum( num - 1);
    }

    return <>
        {/*<List1></List1>*/}
        <div>
            <button onClick={add}>
                add{count}
            </button>
            <button onClick={reduce}>
                reduce{num}
            </button>
        </div>
    </>

}
export default StateDemo;